速報APP / 教育 / Bluetooth Arduino LED

Bluetooth Arduino LED

價格:免費

更新日期:2015-02-26

檔案大小:1.5M

目前版本:1.1

版本需求:Android 1.5 以上版本

官方網站:http://www.netandino.com

Email:ventas@netandino.com

聯絡地址:Jr. Victor Velez 339 Ind. Huaraz Ancash Perú

Bluetooth Arduino LED(圖1)-速報App

Controlar Arduino mediante bluetooth, puede prender y apagar un Led

Datos que envia el APP

Boton Verde "Encender" = 'h'

Boton Rojo "Apagar" = 'l'

Boton Enlaces = Esta selecciona el Modulo Bluetooth a que se va a conectar y/o sincronizar

Cómo ejemplo Usaremos el 13 y GND; Prenda con Botorn Verde y Apague con Boton Rojo

//INICIO

int Led = 13;

int Status=0;

void setup(){

Serial.begin(9600);

pinMode(Led,OUTPUT);

Bluetooth Arduino LED(圖2)-速報App

}

void loop(){

if(Serial.available()!=0){

Status= Serial.read();

}

if (Status =='h'){

digitalWrite(Led,HIGH);

}

if(Status=='l'){

digitalWrite(Led,LOW);

}

}

//FIN

Más Manuales en http://manual.netandino.net